{%extends "base.html"%}
{%block body%}

<script type="text/javascript">
<!--

function validate_form ( form )
{
valid = true;

alert ( "value: " + form.accept_waiver.value );

if ( form.value == "" )
{
alert ( "Please complete all required fields." );
valid = false;
}

return valid;
}

//-->
</script>

<h3>Fill in your information for: </h3>
<table class="sample">
    <tr class="dx"><td><b>{{event.event_type|escape}}</b>: {{event.name|escape}}  - <b>Location:</b> {{event.location|escape}}  - <b>Website: </b> <a href="{{event.website|escape}}">{{event.website|escape}}</a></td></tr>
</table>


{% ifnotequal event.event_limit -1 %}
Registrations: {{currentcount}} -
Limit: {{event.event_limit}} -
Remaining: {{remaining}}
<br/><a href="http://move.brooklynmarathon.com{%url views.SIMPLEexportevententriespaged event.key.id%}">Check if you're signed up</a>
{% endifnotequal %}


<div class="warn">
{{msg|escape}}
</div>


<!-- form action="{%url views.evententry event.key.id%}" onsubmit="return validate_form ( this );" method="post" --> 
<form action="{%url views.evententry event.key.id%}" method="post">

{% ifnotequal event.event_type "Race" %}
{% ifnotequal event.event_type "Team Race" %}
<input type="hidden" name="accept_waiver" value="on"/>
<input type="hidden" name="accept_waiver_participant_2" value="on"/>
<input type="hidden" name="accept_waiver_participant_3" value="on"/>
{% endifnotequal %}
{% endifnotequal %}

{% ifequal event.event_type "Race" %}
<input type="hidden" name="accept_waiver_participant_2" value="on"/>
<input type="hidden" name="accept_waiver_participant_3" value="on"/>
{% endifequal %}

{% ifequal event.event_type "Food Cooperative" %}

<input type="hidden" name="gender" value="M"/>
<input type="hidden" name="birth_day" value="1"/>
<input type="hidden" name="birth_month" value="1"/>
<input type="hidden" name="member_type" value=""/>
<input type="hidden" name="how_did_you_hear_about_the_event" value=""/>
<input type="hidden" name="coupon_code" value=""/>
<input type="hidden" name="comments" value=""/>

{% endifequal %}

{% ifequal event.event_type "Transportation" %}

<input type="hidden" name="gender" value="M"/>
<input type="hidden" name="birth_day" value="1"/>
<input type="hidden" name="birth_month" value="1"/>
<input type="hidden" name="birth_year" value="1900"/>
<input type="hidden" name="address_line_1" value="1"/>
<input type="hidden" name="address_line_2" value=""/>
<input type="hidden" name="city" value="1"/>
<input type="hidden" name="state" value="Other"/>
<input type="hidden" name="country" value="1"/>
<input type="hidden" name="zipcode" value="1"/>
<input type="hidden" name="member_type" value=""/>
<input type="hidden" name="how_did_you_hear_about_the_event" value=""/>

{% endifequal %}

{% ifequal event.event_type "Party" %}

<input type="hidden" name="gender" value="M"/>
<input type="hidden" name="birth_day" value="1"/>
<input type="hidden" name="birth_month" value="1"/>
<input type="hidden" name="birth_year" value="1900"/>
<input type="hidden" name="address_line_1" value="1"/>
<input type="hidden" name="address_line_2" value=""/>
<input type="hidden" name="city" value="1"/>
<input type="hidden" name="state" value="Other"/>
<input type="hidden" name="country" value="1"/>
<input type="hidden" name="zipcode" value="1"/>
<input type="hidden" name="member_type" value=""/>
<input type="hidden" name="how_did_you_hear_about_the_event" value=""/>

{% endifequal %}

{% ifequal event.event_type "Web Hosting" %}

<input type="hidden" name="gender" value="M"/>
<input type="hidden" name="birth_day" value="1"/>
<input type="hidden" name="birth_month" value="1"/>
<input type="hidden" name="birth_year" value="1900"/>
<input type="hidden" name="address_line_1" value="1"/>
<input type="hidden" name="address_line_2" value=""/>
<input type="hidden" name="city" value="1"/>
<input type="hidden" name="state" value="Other"/>
<input type="hidden" name="country" value="1"/>
<input type="hidden" name="zipcode" value="1"/>
<input type="hidden" name="member_type" value=""/>
<input type="hidden" name="how_did_you_hear_about_the_event" value=""/>

{% endifequal %}

{% ifequal event.event_type "Computer Repair" %}

<input type="hidden" name="gender" value="M"/>
<input type="hidden" name="birth_day" value="1"/>
<input type="hidden" name="birth_month" value="1"/>
<input type="hidden" name="birth_year" value="1900"/>
<input type="hidden" name="address_line_1" value="1"/>
<input type="hidden" name="address_line_2" value=""/>
<input type="hidden" name="city" value="1"/>
<input type="hidden" name="state" value="Other"/>
<input type="hidden" name="country" value="1"/>
<input type="hidden" name="zipcode" value="1"/>
<input type="hidden" name="member_type" value=""/>
<input type="hidden" name="how_did_you_hear_about_the_event" value=""/>

{% endifequal %}

<br/><b>(* - Required)</b><br/>
<table class="sample">
{% for field in form %}

{% ifequal field.name "participant2_first" %} {% ifequal event.event_type "Team Race" %} 
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Participant 2:</b></div> </td></tr>
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Name:</b></div> </td></tr>
<tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_middle" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_last" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_gender" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_age" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_birth_month" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_birth_day" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_birth_year" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_email" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_phone_number" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_evening_phone_number" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_address" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_address_line_2" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_city" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_state" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_country" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant2_zipcode" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_first" %} {% ifequal event.event_type "Team Race" %} 
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Participant 3:</b></div> </td></tr>
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Name:</b></div> </td></tr>
<tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_middle" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_last" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_gender" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_age" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_birth_month" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_birth_day" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_birth_year" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_email" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_phone_number" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_evening_phone_number" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_address" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_address_line_2" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_city" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_state" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_country" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
{% ifequal field.name "participant3_zipcode" %} {% ifequal event.event_type "Team Race" %} <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr> {% endifequal %} {% else %}
    {% ifequal field.name "team_name" %}

	{% ifequal event.event_type "Team Race" %}

	<tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td>
		<div class="warn">  {{ field.help_text }} {{ field }}</div> </td> </tr>

	{% endifequal %}

    {% else %}
    {% ifequal field.name "accept_waiver_participant_3" %}

	{% ifequal event.event_type "Team Race" %}

	<tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td>
		<div class="warn">  {{ field.help_text }} {{ field }}</div> </td> </tr>

	{% endifequal %}

    {% else %}
    {% ifequal field.name "accept_waiver_participant_2" %}

	{% ifequal event.event_type "Team Race" %}

	<tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td>
		<div class="warn">  {{ field.help_text }} {{ field }}</div> </td> </tr>

	{% endifequal %}

    {% else %}
    {% ifequal field.name "accept_waiver" %}

	{% ifequal event.event_type "Race" %}


	<tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td>
		<b>Waiver:</b> {{event.waiver|escape}}<br/>
		<div class="warn">  {{ field.help_text }} {{ field }}</div> </td> </tr>

	{% endifequal %}
	{% ifequal event.event_type "Team Race" %}

	<tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td>
		<b>Waiver:</b> {{event.waiver|escape}}<br/>
		<div class="warn">  {{ field.help_text }} {{ field }}</div> </td> </tr>

	{% endifequal %}

    {% else %}

    {% ifequal field.name "division" %}

	{% ifequal event.event_type "XRace" %}

        <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr>

	{% endifequal %}

    {% else %}

    {% ifequal field.name "shirt_size" %}

	{% ifequal event.event_type "XRace" %}

        <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr>

	{% endifequal %}

	{% ifequal event.event_type "XTeam Race" %}

        <tr class="d0"> <td><b><center>{{ field.label_tag }} {% if field.field.required %}*{% endif %} </center></b> <br/><center><div class="warn">{{ field.errors }}</div></center> </td> <td> {{ field }} {{ field.help_text }} </td> </tr>

	{% endifequal %}

    {% else %}

    {% ifequal field.name "shirt_size_2" %}

	{% ifequal event.event_type "XTeam Race" %}

    <tr class="d0">
	<td><b><center>{{ field.label_tag }} 
		    {% if field.field.required %}*{% endif %}
	</center></b>
	<br/><center><div class="warn">{{ field.errors }}</div></center>
    </td>
    <td> 
	{{ field }} {{ field.help_text }}

    </td>
    </tr>

	{% endifequal %}

    {% else %}

    {% ifequal field.name "shirt_size_3" %}

	{% ifequal event.event_type "XTeam Race" %}

    <tr class="d0">
	<td><b><center>{{ field.label_tag }} 
		    {% if field.field.required %}*{% endif %}
	</center></b>
	<br/><center><div class="warn">{{ field.errors }}</div></center>
    </td>
    <td> 
	{{ field }} {{ field.help_text }}

    </td>
    </tr>

	{% endifequal %}

    {% else %}

    {% ifequal field.name "team_type" %}

	{% ifequal event.event_type "Team Race" %}

    <tr class="d0">
	<td><b><center>{{ field.label_tag }} 
		    {% if field.field.required %}*{% endif %}
	</center></b>
	<br/><center><div class="warn">{{ field.errors }}</div></center>
    </td>
    <td> 
	{{ field }} {{ field.help_text }}

    </td>
    </tr>

	{% endifequal %}

    {% else %}

{% ifequal event.event_type "Transportation" %}

<!-- <tr><td><br/><center><div class="warn">{{ field.field.required }} {{ field.label_tag }} {{ field.errors }}</div></center></td></tr> -->



	{% ifnotequal field.name "gender" %}
	{% ifnotequal field.name "birth_day" %}
	{% ifnotequal field.name "birth_month" %}
	{% ifnotequal field.name "birth_year" %}
	{% ifnotequal field.name "address_line_1" %}
	{% ifnotequal field.name "address_line_2" %}
	{% ifnotequal field.name "city" %}
	{% ifnotequal field.name "state" %}
	{% ifnotequal field.name "country" %}
	{% ifnotequal field.name "zipcode" %}
	{% ifnotequal field.name "member_type" %}
	{% ifnotequal field.name "how_did_you_hear_about_the_event" %}



<tr class="d0">
    <td><b><center>{{ field.label_tag }} 
		{% if field.field.required %}*{% endif %}
    </center></b>
    <br/><center><div class="warn">{{ field.errors }}</div></center>
</td>
<td> 
    {% ifequal field.name "membership_type" %}
	{% ifequal  event.nonmember_price 0 %}
	    <select name="membership_type" id="id_membership_type"> 
		<option value="" selected="selected">---------</option> 
		<option value="Member price">Member price</option> 
	    </select> 
    {{ field.help_text }}
	{% else %}
    {{ field }} 
    {{ field.help_text }}
	{% endifequal %}
    {% else %}
    <!-- normal case -->
    {{ field }} 
    {{ field.help_text }}
	{% ifequal field.name "daytime_phone_number" %}
<div class="warn">Please give an event day phone number where you can be reached</div>
	{% endifequal %}
    {% endifequal %}

	{% ifequal  forloop.counter 1 %}
	<br/>${{event.member_price|floatformat:2}} - Member price<br/>
	{% ifequal  event.nonmember_price 0 %}
	{% else %}
    ${{event.nonmember_price|floatformat:2}} - Nonmember price<br/>
	{% endifequal %}
    {{event.advertisement|escape}}<br/>
	{% else %}

	{% endifequal %}
</td>
</tr>

	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}

{% endifequal %}

{% ifequal event.event_type "Party" %}

<!-- <tr><td><br/><center><div class="warn">{{ field.field.required }} {{ field.label_tag }} {{ field.errors }}</div></center></td></tr> -->



	{% ifnotequal field.name "gender" %}
	{% ifnotequal field.name "birth_day" %}
	{% ifnotequal field.name "birth_month" %}
	{% ifnotequal field.name "birth_year" %}
	{% ifnotequal field.name "address_line_1" %}
	{% ifnotequal field.name "address_line_2" %}
	{% ifnotequal field.name "city" %}
	{% ifnotequal field.name "state" %}
	{% ifnotequal field.name "country" %}
	{% ifnotequal field.name "zipcode" %}
	{% ifnotequal field.name "member_type" %}
	{% ifnotequal field.name "how_did_you_hear_about_the_event" %}



<tr class="d0">
    <td><b><center>{{ field.label_tag }} 
		{% if field.field.required %}*{% endif %}
    </center></b>
    <br/><center><div class="warn">{{ field.errors }}</div></center>
</td>
<td> 
    {% ifequal field.name "membership_type" %}
	{% ifequal  event.nonmember_price 0 %}
	    <select name="membership_type" id="id_membership_type"> 
		<option value="" selected="selected">---------</option> 
		<option value="Member price">Member price</option> 
	    </select> 
    {{ field.help_text }}
	{% else %}
    {{ field }} 
    {{ field.help_text }}
	{% endifequal %}
    {% else %}
    <!-- normal case -->
    {{ field }} 
    {{ field.help_text }}
	{% ifequal field.name "daytime_phone_number" %}
<!-- div class="warn">Please give an event day phone number where you can be reached</div -->
	{% endifequal %}
    {% endifequal %}

	{% ifequal  forloop.counter 1 %}
	<br/>${{event.member_price|floatformat:2}} - Member price<br/>
	{% ifequal  event.nonmember_price 0 %}
	{% else %}
    ${{event.nonmember_price|floatformat:2}} - Nonmember price<br/>
	{% endifequal %}
    {{event.advertisement|escape}}<br/>
	{% else %}

	{% endifequal %}
</td>
</tr>

	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}

{% endifequal %}

{% ifequal event.event_type "Computer Repair" %}

<!-- <tr><td><br/><center><div class="warn">{{ field.field.required }} {{ field.label_tag }} {{ field.errors }}</div></center></td></tr> -->



	{% ifnotequal field.name "gender" %}
	{% ifnotequal field.name "birth_day" %}
	{% ifnotequal field.name "birth_month" %}
	{% ifnotequal field.name "birth_year" %}
	{% ifnotequal field.name "address_line_1" %}
	{% ifnotequal field.name "address_line_2" %}
	{% ifnotequal field.name "city" %}
	{% ifnotequal field.name "state" %}
	{% ifnotequal field.name "country" %}
	{% ifnotequal field.name "zipcode" %}
	{% ifnotequal field.name "member_type" %}
	{% ifnotequal field.name "how_did_you_hear_about_the_event" %}



<tr class="d0">
    <td><b><center>{{ field.label_tag }} 
		{% if field.field.required %}*{% endif %}
    </center></b>
    <br/><center><div class="warn">{{ field.errors }}</div></center>
</td>
<td> 
    {% ifequal field.name "membership_type" %}
	{% ifequal  event.nonmember_price 0 %}
	    <select name="membership_type" id="id_membership_type"> 
		<option value="" selected="selected">---------</option> 
		<option value="Member price">Member price</option> 
	    </select> 
    {{ field.help_text }}
	{% else %}
    {{ field }} 
    {{ field.help_text }}
	{% endifequal %}
    {% else %}
    <!-- normal case -->
    {{ field }} 
    {{ field.help_text }}
    {% endifequal %}

	{% ifequal  forloop.counter 1 %}
	<br/>${{event.member_price|floatformat:2}} - Member price<br/>
	{% ifequal  event.nonmember_price 0 %}
	{% else %}
    ${{event.nonmember_price|floatformat:2}} - Nonmember price<br/>
	{% endifequal %}
    {{event.advertisement|escape}}<br/>
	{% else %}

	{% endifequal %}
</td>
</tr>

	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}

{% endifequal %}
{% ifequal event.event_type "Web Hosting" %}

<!-- <tr><td><br/><center><div class="warn">{{ field.field.required }} {{ field.label_tag }} {{ field.errors }}</div></center></td></tr> -->



	{% ifnotequal field.name "gender" %}
	{% ifnotequal field.name "birth_day" %}
	{% ifnotequal field.name "birth_month" %}
	{% ifnotequal field.name "birth_year" %}
	{% ifnotequal field.name "address_line_1" %}
	{% ifnotequal field.name "address_line_2" %}
	{% ifnotequal field.name "city" %}
	{% ifnotequal field.name "state" %}
	{% ifnotequal field.name "country" %}
	{% ifnotequal field.name "zipcode" %}
	{% ifnotequal field.name "member_type" %}
	{% ifnotequal field.name "how_did_you_hear_about_the_event" %}



<tr class="d0">
    <td><b><center>{{ field.label_tag }} 
		{% if field.field.required %}*{% endif %}
    </center></b>
    <br/><center><div class="warn">{{ field.errors }}</div></center>
</td>
<td> 
    {% ifequal field.name "membership_type" %}
	{% ifequal  event.nonmember_price 0 %}
	    <select name="membership_type" id="id_membership_type"> 
		<option value="" selected="selected">---------</option> 
		<option value="Member price">Member price</option> 
	    </select> 
    {{ field.help_text }}
	{% else %}
    {{ field }} 
    {{ field.help_text }}
	{% endifequal %}
    {% else %}
    <!-- normal case -->
    {{ field }} 
    {{ field.help_text }}
    {% endifequal %}

	{% ifequal  forloop.counter 1 %}
	<br/>${{event.member_price|floatformat:2}} - Member price<br/>
	{% ifequal  event.nonmember_price 0 %}
	{% else %}
    ${{event.nonmember_price|floatformat:2}} - Nonmember price<br/>
	{% endifequal %}
    {{event.advertisement|escape}}<br/>
	{% else %}

	{% endifequal %}
</td>
</tr>

	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}

{% endifequal %}


{% ifequal event.event_type "Food Cooperative" %}


	{% ifnotequal field.name "gender" %}
	{% ifnotequal field.name "birth_day" %}
	{% ifnotequal field.name "birth_month" %}
	{% ifnotequal field.name "member_type" %}
	{% ifnotequal field.name "how_did_you_hear_about_the_event" %}
	{% ifnotequal field.name "comments" %}
	{% ifnotequal field.name "coupon_code" %}



<tr class="d0">
    <td><b><center>{{ field.label_tag }} 
		{% if field.field.required %}*{% endif %}
    </center></b>
    <br/><center><div class="warn">{{ field.errors }}</div></center>
</td>
<td> 
    {% ifequal field.name "membership_type" %}
	{% ifequal  event.nonmember_price 0 %}
	<input type="hidden" name="membership_type" id="id_membership_type" value="Member price"/>
	    <!-- <select name="membership_type" id="id_membership_type"> 
		<option value="" selected="selected">---------</option> 
		<option value="Member price">Member price</option> 
	    </select>   -->
    {{ field.help_text }}
	{% else %}
    {{ field }} 
    {{ field.help_text }}
	{% endifequal %}
    {% else %}
    <!-- normal case -->
    {{ field }} 
    {{ field.help_text }}
    {% endifequal %}

	{% ifequal  forloop.counter 1 %}
	<br/>${{event.member_price|floatformat:2}} - Member price<br/>
	{% ifequal  event.nonmember_price 0 %}
	{% else %}
    ${{event.nonmember_price|floatformat:2}} - Nonmember price<br/>
	{% endifequal %}
    {{event.advertisement|escape}}<br/>
	{% else %}

	{% endifequal %}
</td>
</tr>

	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}

{% endifequal %}


{% ifequal event.event_type "Event" %}

<tr class="d0">
    <td><b><center>{{ field.label_tag }} 
		{% if field.field.required %}*{% endif %}
    </center></b>
    <br/><center><div class="warn">{{ field.errors }}</div></center>
</td>
<td> 
    {% ifequal field.name "membership_type" %}
	{% ifequal  event.nonmember_price 0 %}
	    <select name="membership_type" id="id_membership_type"> 
		<option value="" selected="selected">---------</option> 
		<option value="Member price">Member price</option> 
	    </select> 
    {{ field.help_text }}
	{% else %}
    {{ field }} 
    {{ field.help_text }}
	{% endifequal %}
    {% else %}
    <!-- normal case -->
    {{ field }} 
    {{ field.help_text }}
    {% endifequal %}

	{% ifequal  forloop.counter 1 %}
	<br/>${{event.member_price|floatformat:2}} - Member price<br/>
	{% ifequal  event.nonmember_price 0 %}
	{% else %}
    ${{event.nonmember_price|floatformat:2}} - Nonmember price<br/>
	{% endifequal %}
    {{event.advertisement|escape}}<br/>
	{% else %}

	{% endifequal %}
</td>
</tr>

{% endifequal %}

{% ifequal event.event_type "Club Membership" %}

<tr class="d0">
    <td><b><center>{{ field.label_tag }} 
		{% if field.field.required %}*{% endif %}
    </center></b>
    <br/><center><div class="warn">{{ field.errors }}</div></center>
</td>
<td> 
    {% ifequal field.name "membership_type" %}
	{% ifequal  event.nonmember_price 0 %}
	    <select name="membership_type" id="id_membership_type"> 
		<option value="" selected="selected">---------</option> 
		<option value="Member price">Member price</option> 
	    </select> 
    {{ field.help_text }}
	{% else %}
    {{ field }} 
    {{ field.help_text }}
	{% endifequal %}
    {% else %}
    <!-- normal case -->
    {{ field }} 
    {{ field.help_text }}
    {% endifequal %}

	{% ifequal  forloop.counter 1 %}
	<br/>${{event.member_price|floatformat:2}} - Member price<br/>
	{% ifequal  event.nonmember_price 0 %}
	{% else %}
    ${{event.nonmember_price|floatformat:2}} - Nonmember price<br/>
	{% endifequal %}
    {{event.advertisement|escape}}<br/>
	{% else %}

	{% endifequal %}
</td>
</tr>

{% endifequal %}

{% ifequal event.event_type "Race" %}

	{% ifnotequal field.name "middle" %}
	{% ifnotequal field.name "coupon_code" %}
	{% ifnotequal field.name "address_line_2" %}
	{% ifnotequal field.name "member_type" %}
	{% ifnotequal field.name "evening_phone_number" %}

	{% ifequal field.name "first" %}
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Your Name:</b></div> </td></tr>
        {% endifequal %}

<tr class="d0">
    <td><b><center>
	{% ifequal field.name "address_line_1" %}
		 Address
	{% else %}
		{{ field.label_tag }} 
	{% endifequal %}

		{% if field.field.required %}*{% endif %}
    </center></b>
    <br/><center><div class="warn">{{ field.errors }}</div></center>
</td>
<td> 
    {% ifequal field.name "membership_type" %}
	{% ifequal  event.nonmember_price 0 %}
	    <select name="membership_type" id="id_membership_type"> 
		<option value="" selected="selected">---------</option> 
		<option value="Member price">Member price</option> 
	    </select> 
    {{ field.help_text }}
	{% else %}
    {{ field }} 
    {{ field.help_text }}
	{% endifequal %}
    {% else %}
    <!-- normal case -->
    {{ field }} 
    {{ field.help_text }}
    {% endifequal %}

	{% ifequal  forloop.counter 1 %}
	<br/>${{event.member_price|floatformat:2}} - {{event.event_owner_name}} Member price<br/>
	{% ifequal  event.nonmember_price 0 %}
	{% else %}
	${{event.nonmember_price|floatformat:2}} - {{event.event_owner_name}} Nonmember price<br/>
	{% endifequal %}
    {{event.advertisement|escape}}<br/>
	{% else %}

	{% endifequal %}
</td>
</tr>

	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}

{% endifequal %}

{% ifequal event.event_type "Team Race" %}

	{% ifnotequal field.name "middle" %}
	{% ifnotequal field.name "coupon_code" %}
	{% ifnotequal field.name "address_line_2" %}
	{% ifnotequal field.name "member_type" %}
	{% ifnotequal field.name "evening_phone_number" %}

	{% ifequal field.name "first" %}
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Team Captain Information:</b></div> </td></tr>
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Name:</b></div> </td></tr>
        {% endifequal %}

	{% ifequal field.name "participant2_first" %}
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Participant 2:</b></div> </td></tr>
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Name:</b></div> </td></tr>
        {% endifequal %}

	{% ifequal field.name "participant3_first" %}
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Participant 3:</b></div> </td></tr>
	<tr class="dx"><td colspan="100%"><div class="warn"><b>Name:</b></div> </td></tr>
        {% endifequal %}

<tr class="d0">
    <td><b><center>

	{% ifequal field.name "address_line_1" %}
		 Address
	{% else %}
	{% ifequal field.name "xfirst" %}
		 Team Name
	{% else %}
	{% ifequal field.name "xlast" %}
		 Team Members
	{% else %}
		{{ field.label_tag }} 
        {% endifequal %}
        {% endifequal %}
        {% endifequal %}

		{% if field.field.required %}*{% endif %}
    </center></b>
    <br/><center><div class="warn">{{ field.errors }}</div></center>
</td>
<td> 
    {% ifequal field.name "membership_type" %}
	{% ifequal  event.nonmember_price 0 %}
	    <select name="membership_type" id="id_membership_type"> 
		<option value="" selected="selected">---------</option> 
		<option value="Member price">Member price</option> 
	    </select> 
    {{ field.help_text }}
	{% else %}
    {{ field }} 
    {{ field.help_text }}
	{% endifequal %}
    {% else %}
    <!-- normal case -->
    {{ field }} 
    {{ field.help_text }}
	{% ifequal field.name "xfirst" %}
<div class="warn">Please enter team name.</div>
	{% endifequal %}
	{% ifequal field.name "xlast" %}
<div class="warn">Please enter all team members names.</div>
	{% endifequal %}
	{% ifequal field.name "xemail" %}
<div class="warn">Please enter all team members email addresses. member1@x.com,member2@x.com,...</div>
	{% endifequal %}
	{% ifequal field.name "xaddress_line_1" %}
<div class="warn">Please enter all team members addresses. </div>
	{% endifequal %}
	{% ifequal field.name "xdaytime_phone_number" %}
<div class="warn">Please enter all team members phone numbers. </div>
	{% endifequal %}
    {% endifequal %}

	{% ifequal  forloop.counter 1 %}
	<br/>${{event.member_price|floatformat:2}} - {{event.event_owner_name}} Member price<br/>
	{% ifequal  event.nonmember_price 0 %}
	{% else %}
	${{event.nonmember_price|floatformat:2}} - {{event.event_owner_name}} Nonmember price<br/>
	{% endifequal %}
    {{event.advertisement|escape}}<br/>
	{% else %}

	{% endifequal %}
</td>
</tr>

	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}
	{% endifnotequal %}

{% endifequal %}


    {% endifequal %}

    {% endifequal %}

    {% endifequal %}

    {% endifequal %}

    {% endifequal %}

    {% endifequal %}
    {% endifequal %}
    {% endifequal %}

    {% endifequal %}

    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}
    {% endifequal %}


{% endfor %}

</table>
<hr/>
<tr><td><input type="submit" value="Continue to payment page"></td></tr>
<input type="hidden" name="clubid" value="{{club.key.id}}">
</table>
</form>




{%endblock%}
